<template>
  <div class="phone_container">
    <div class="phone_box overflow-hidden">
      <div class="phone_cont" id="iframeContainer">
        <iframe id="mobileIframe" :src="src" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
      </div>
    </div>
  </div>
</template>

<script setup>
defineOptions({ name: 'Phone' })
const props = defineProps({
  src: {
    default: '',
    type: String
  }
})
</script>
<style lang="scss" scoped>
.phone_container {
  width: 308px;
  height: 627px;
  color: rgba(80, 80, 80, 1);
  background-color: rgba(242, 242, 242, 1);
  border-radius: 42px;
  box-shadow: 0px 0px 29px 0px rgba(0, 0, 0, 0.5);
  position: relative;
  box-sizing: border-box;
  padding: 18px;
  .phone_head {
    width: 50%;
    height: 44px;
    background-color: rgba(242, 242, 242, 1);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px;
    .phone_long {
      position: absolute;
      width: 44px;
      height: 4px;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background-color: rgba(151, 151, 151, 0.6);
      border-radius: 3px;
    }
    .phone_circular {
      position: absolute;
      width: 8px;
      height: 8px;
      left: 76%;
      top: 50%;
      transform: translateY(-50%);
      background-color: rgba(153, 153, 153, 1);
      border-radius: 50%;
    }
  }
  .phone_box {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 42px;
    box-sizing: border-box;
    .phone_cont {
      width: 100%;
      height: 100%;
      overflow: hidden;
      border-bottom-left-radius: 42px;
      border-bottom-right-radius: 42px;
      padding: 1px;
      box-sizing: border-box;
      cursor: pointer;
      iframe {
        user-select: none;
      }
    }
  }
}
</style>
